#ifndef CDIRECTSHOW_H
#define CDIRECTSHOW_H

#include <dshow.h>

#define WM_VIDEOCHECK	WM_USER+20

class CDirectShow
{
private:
	HWND m_hWnd;
	BOOL m_bIsLoop;

public:
	IGraphBuilder*			pGraph;
	IMediaControl*			pMediaControl;
	IVideoWindow*			pVidWin;
	IMediaEventEx*			pEvent;
	IMediaSeeking*			pSeeking;
	
	CDirectShow(HWND hWnd);
	~CDirectShow();

	void Open(char* szFile, int window_mode);
	void Play();
	void Stop();
	void Destroy(void);
	void Resize();
	int HandleEvent(void);

	BOOL IsEnd();
};


#endif